﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RobotJog.CCoLinearJogModeCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.RobotJog;

public class CCoLinearJogModeCmd : TxToggleButtonCommand
{
  private CCoLinearJogModeCmdEnabler _enabler;
  private CApLinearJogModeApp _app;

  public CCoLinearJogModeCmd()
  {
    this._enabler = new CCoLinearJogModeCmdEnabler();
    this._app = new CApLinearJogModeApp();
  }

  public virtual bool Push => this._app.IsActive;

  public virtual string Category => RJRobotJogResources.LinearJogModeCmdCategory;

  public virtual string Name => RJRobotJogResources.LinearJogModeCmdName;

  public virtual string Tooltip => RJRobotJogResources.LinearJogModeCmdTooltip;

  public virtual string Description => RJRobotJogResources.LinearJogModeCmdDescription;

  public virtual string Bitmap => "RobotJog.Resources.RobotJog.bmp";

  public virtual string LargeBitmap => "RobotJog.Resources.RobotJog_LARGE.png";

  public virtual ITxImage Image => (ITxImage) TxImageManager.GetImageByKey("RobotJog");

  public virtual bool Licensed => TxCommandLicenser.RobotJogLicense;

  public virtual ITxCommandEnabler CommandEnabler => (ITxCommandEnabler) this._enabler;

  public virtual void Execute(object cmdParams) => this._app.IsActive = !this._app.IsActive;

  public virtual bool Connect()
  {
    this._app.Initialize();
    return true;
  }

  public virtual void Disconnect() => this._app.Uninitialize();
}
